package com.app.shiyanbiji.service;

import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.app.shiyanbiji.model.User;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

/**
 * 
 * @author hekezui
 *
 */
@Service
public class UserService extends BaseService {

	private Logger logger = Logger.getLogger(UserService.class);
	
	@Transactional(readOnly=true)
	public PageInfo<User> selectUserBaseInfoById(int pageNum, int pageSize) {
		PageHelper.startPage(pageNum, pageSize);
		List<User> userList = sqlSessionTemplate.selectList(sql());
		PageInfo<User> page = new PageInfo(userList);
		return page;
	}
}
